//
//  Coding_NetAPIManager.h
//  百车易车险
//
//  Created bychenxu on 14-7-30.
//  Copyright (c) 2014年 chenxu. All rights reserved.
//


#import "NetAPIClient.h"
#import "Login.h"

@interface NetAPIManager : NSObject

+ (instancetype)sharedManager;

//用户Login
- (void)request_Login_WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block;
- (void)request_Register_WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block;
- (void)request_Logout_WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block;

- (void)request_limitNumber:(id)params andBlock:(void (^)(id data, NSError *error))block;
- (void)request_company:(id)params andBlock:(void (^)(id data,NSError *error))block;




//车辆相关
- (void)request_cars:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)add_car:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)modify_car:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)delete_car:(id)params andBlock:(void (^)(id data,NSError *error))block;

//获取报价
- (void)request_price:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)refresh_price:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)request_unfinishedorder:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)request_finishedorder:(id)params andBlock:(void (^)(id data,NSError *error))block;

//订单
- (void)submit_order:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)finish_order:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)delete_order:(id)params andBlock:(void (^)(id data,NSError *error))block;




//编辑个人信息
- (void)edit_UserInfo:(id)params andBlock:(void (^)(id data, NSError *error))block;
//更改密码
- (void)update_password:(id)params andBlock:(void (^)(id data, NSError *error))block;
//申请客服
- (void)send_feedback:(id)params andBlock:(void (^)(id data, NSError *error))block;
//更新userid
- (void)update_id:(id)params andBlock:(void (^)(id data, NSError *error))block;
//获取userid、channelid
- (void)user_request_baiduid:(id)params andBlock:(void (^)(id data, NSError *error))block;
- (void)company_request_baiduid:(id)params andBlock:(void (^)(id data, NSError *error))block;
//保存用户聊天信息
- (void)update_talk:(id)params andBlock:(void (^)(id data, NSError *error))block;

//图像
- (void)uploadUserIconImage:(UIImage *)image
                  withParam:(NSDictionary*)param
               successBlock:(void (^)(NSString *imagePath))success
               failureBlock:(void (^)(NSError *error))failure
              progerssBlock:(void (^)(CGFloat progressValue))progress;

- (void)request_UpdateUserIconImage:(UIImage *)image withParam:(NSDictionary*)param
                       successBlock:(void (^)(id responseObj))success
                       failureBlock:(void (^)(NSError *error))failure
                      progerssBlock:(void (^)(CGFloat progressValue))progress;

- (void)loadImageWithPath:(NSString *)imageUrlStr completeBlock:(void (^)(UIImage *image, NSError *error))block;


- (void)request_finishedorderinfo:(id)params andBlock:(void (^)(id data,NSError *error))block;


//商家login
- (void)company_Logout_WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block;
- (void)company_Login_WithParams:(id)params andBlock:(void (^)(id data, NSError *error))block;

//商家订单
- (void)company_request_unfinishedorder:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)company_request_finishedorder:(id)params andBlock:(void (^)(id data,NSError *error))block;
- (void)company_baojia:(id)params andBlock:(void (^)(id data,NSError *error))block;

//已完成订单详情
- (void)company_request_finishedorderinfo:(id)params andBlock:(void (^)(id data,NSError *error))block;


- (NSString*)getAvatarUrl:(NSString*)username;
@end
